/*
 * @Author: zheguo 3188606474@qq.com
 * @Date: 2024-04-19 19:29:52
 * @LastEditors: zheguo 3188606474@qq.com
 * @LastEditTime: 2024-04-24 22:35:11
 * @FilePath: \projectOne\myexpress\app\router\adminRouter\admin.router.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const adminController = require("../../controllers/admin/admin.controller");
module.exports = app => {
    const adminController = require("../../controllers/admin/admin.controller")

    const router = require("express").Router();

    //  管理员登录
    app.use("/adminLogin", router)

    // 管理员登录
    router.get("/", adminController.findone)
    // 查询管理员所有数据
    router.get("/admin/alldata", adminController.findAll)
    // 添加管理员数据
    router.post("/add", adminController.create)
    // 修改管理员数据
    router.post("/updated",adminController.update)
    // 删除管理员数据
    router.get("/delete",adminController.delete)
}